package at.ac.univie.zsu.aguataplan.property;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.annotation.Value;

/**
 * encapsulate "database.properties" for easier use
 * 
 * @author gerry
 * 
 */
@Configurable
public class DatabaseProperties {

	@Value(value = "#{databasePropertiesProp['database.password']}")
	private String password;
	@Value(value = "#{databasePropertiesProp['database.url']}")
	private String url;
	@Value(value = "#{databasePropertiesProp['database.username']}")
	private String username;
	@Value(value = "#{databasePropertiesProp['database.driverClassName']}")
	private String driverClassName;

	// ----------------------------------------------------
	// CONSTRUCTOR
	// ----------------------------------------------------

	public DatabaseProperties() {
	}

	// ----------------------------------------------------
	// GETTER & SETTER
	// ----------------------------------------------------

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getDriverClassName() {
		return driverClassName;
	}

	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}

}
